import React from 'react'
import PubSub from 'pubsub-js'

export default function Son2() {
  return (
    <div>
      <h2>Son2</h2>
      <br />
      <button
        onClick={() => {
          PubSub.publish('msg', '我是Son2组件')
        }}
      >
        发布消息2
      </button>
    </div>
  )
}
